diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index cf1986b..e61a04e 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -112,6 +112,50 @@
 }
 
 #ifdef CONFIG_DM_USB
+static int xhci_dwc3_setup_phy(struct udevice *dev, int index, struct phy *phy)
+{
+	int ret = 0;
+
+	ret = generic_phy_get_by_index(dev, index, phy);
+	if (ret) {
+		if (ret != -ENOENT) {
+			pr_err("Failed to get USB PHY for %s\n", dev->name);
+			return ret;
+		}
+	} else {
+		ret = generic_phy_init(phy);
+		if (ret) {
+			pr_err("Can't init USB PHY for %s\n", dev->name);
+			return ret;
+		}
+		ret = generic_phy_power_on(phy);
+		if (ret) {
+			pr_err("Can't power on USB PHY for %s\n", dev->name);
+			generic_phy_exit(phy);
+			return ret;
+		}
+	}
+
+	return 0;
+}
+
+static int xhci_dwc3_shutdown_phy(struct phy *phy)
+{
+	int ret = 0;
+
+	if (generic_phy_valid(phy)) {
+		ret = generic_phy_power_off(phy);
+		if (ret)
+			return ret;
+
+		ret = generic_phy_exit(phy);
+		if (ret)
+			return ret;
+	}
+
+	return 0;
+}
+
 static int xhci_dwc3_probe(struct udevice *dev)
 {
 	struct xhci_dwc3_platdata *plat = dev_get_platdata(dev);
@@ -125,24 +169,10 @@
 	hcor = (struct xhci_hcor *)((uintptr_t)hccr +
 			HC_LENGTH(xhci_readl(&(hccr)->cr_capbase)));
 
-	ret = generic_phy_get_by_index(dev, 0, &plat->usb_phy);
+	ret = xhci_dwc3_setup_phy(dev, 0, &plat->usb_phy);
 	if (ret) {
-		if (ret != -ENOENT) {
-			pr_err("Failed to get USB PHY for %s\n", dev->name);
-			return ret;
-		}
-	} else {
-		ret = generic_phy_init(&plat->usb_phy);
-		if (ret) {
-			pr_err("Can't init USB PHY for %s\n", dev->name);
-			return ret;
-		}
-
-		ret = generic_phy_power_on(&plat->usb_phy);
-		if (ret) {
-			pr_err("Can't power on USB PHY for %s\n", dev->name);
-			return ret;
-		}
+		pr_err("Failed to setup USB PHY for %s\n", dev->name);
+		return ret;
 	}
 
 	dwc3_reg = (struct dwc3 *)((char *)(hccr) + DWC3_REG_OFFSET);
@@ -164,19 +194,10 @@
 	struct xhci_dwc3_platdata *plat = dev_get_platdata(dev);
 	int ret;
 
-	if (generic_phy_valid(&plat->usb_phy)) {
-		ret = generic_phy_power_off(&plat->usb_phy);
-		if (ret) {
-			pr_err("Can't poweroff USB PHY for %s\n", dev->name);
-			return ret;
-		}
+	ret = xhci_dwc3_shutdown_phy(&plat->usb_phy);
+	if (ret)
+		pr_err("Can't shutdown USB PHY for %s\n", dev->name);
 
-		ret = generic_phy_exit(&plat->usb_phy);
-		if (ret) {
-			pr_err("Can't deinit USB PHY for %s\n", dev->name);
-			return ret;
-		}
-	}
 
 	return xhci_deregister(dev);
 }
